package main

import "fmt"

type Person struct{
	Name, City string
	Age uint8
}


func main() {

	// make new 区别
	// make 用于slice chan map的创建 创建一个引用类型的对象
	// new 基本类型和struct 创建一个指针

	p := new(Person)
	p.Name = "xiaoming"
	p.City = "guangzhou"
	p.Age = 12
	
	fmt.Println(p)


	s := make([]int,6, 10)
	s[0] = 9
	s[1] = 10
	s[2] = 11
	s[3] = 12
	s[4] = 13
	s[5] = 14
	fmt.Println(s)

	m := make(map[string]int)
	m["hello"] =1
	m["world"] =2
	fmt.Println(m)

	c := make(chan int)
	fmt.Println(c)
}